import { createRouter, createWebHashHistory } from "vue-router";

//路由配置
const routes = [
    { path: "/", name: "home", component: () => import("../views/index.vue") },
    { path: "/login", name: "lgoin", component: () => import("../views/login.vue") },
    {
        path: "/:pathMatch(.*)*", // 这是一个捕获所有未匹配路径的路由，显示404页面
        name: "notFound",
        component: () => import("../views/404.vue"),
    },
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;
